﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TagLib;
using TagLib.Audible;

namespace Mp3Lib
{
    public class Mp3RecognizerLib
    {
        private const string mp3Extension = @".mp3";

        public void RenameAll(string folder)
        {
            DirectoryInfo directory = new DirectoryInfo(folder);
            FileInfo[] files = directory.GetFiles();
            foreach (var file in files)
            {
                if (string.Compare(file.Extension, mp3Extension, StringComparison.InvariantCultureIgnoreCase) == 0)
                {
                    TagLib.Audible.File f = new TagLib.Audible.File(file.FullName, ReadStyle.Average);
                    var artists = f.Tag.AlbumArtists;
                    var trackName = f.Tag.Title;
		    int x = 10;

                }
            }
        }
    }

}
